@echo off
title Upload to Gitee
color 0A

echo.
echo  ===============================================
echo        Upload to Gitee Repository
echo         https://gitee.com/k1565566/gitee_-deploy.md
echo  ===============================================
echo.

:: Create package directory
echo Preparing files...
set "PACKAGE_DIR=Gitee_Upload_%date:~0,4%%date:~5,2%%date:~8,2%"
mkdir "%PACKAGE_DIR%" 2>nul

echo Copying files...

:: Copy core files
copy "手机PWA直接打开版.html" "%PACKAGE_DIR%\" >nul
copy "manifest.json" "%PACKAGE_DIR%\" >nul  
copy "service-worker.js" "%PACKAGE_DIR%\" >nul

:: Copy documentation
copy "PWA快速使用指南.md" "%PACKAGE_DIR%\" >nul
copy "一键手机版.bat" "%PACKAGE_DIR%\" >nul
copy "上传状态检查.md" "%PACKAGE_DIR%\" >nul

:: Copy utility files
copy "一键打包上传.bat" "%PACKAGE_DIR%\" >nul
copy "手动上传Gitee指南.md" "%PACKAGE_DIR%\" >nul

echo Files prepared successfully!
echo.
echo Package directory: %PACKAGE_DIR%
echo.

:: Show package contents
echo Package contents:
dir /b "%PACKAGE_DIR%"
echo.

:: Open package directory
echo Opening package directory...
start "" "%PACKAGE_DIR%"

echo.
echo Next steps:
echo.
echo 1. Open browser and visit:
echo    https://gitee.com/k1565566/gitee_-deploy.md
echo.
echo 2. Click "Web IDE" or "Edit" button
echo.
echo 3. Drag and drop files from package directory
echo.
echo 4. Fill in commit message and click "Submit"
echo.
echo Tip: Package directory is now open, you can copy file paths

echo.
echo Mobile usage:
echo - After upload, visit HTML file URL on mobile
echo - Add to home screen for offline use
echo - Supports image management, search, etc.

echo.
echo Press any key to complete...
pause >nul